<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //表达式
        var m=100,n=200;
        let result=`${m} + ${n} = ${m+n}`;
        console.log(result,typeof result);

        var obj={x:300,y:400};
        var exp=`${obj.x/3} x ${obj.y/4} = ${(obj.x/3)*(obj.y/4)}`;
        console.log(exp);

        //函数
        let add=(m,n)=>m+n;
        let addStr=`100+200=${add(100,200)}`;
        console.log(addStr);

        //IIFE
        let iife=`输出：${ function(str){console.log(str);return str;}('Hello IIFE!') }`;
        console.log(iife);
    </script>
</body>
</html>